Skip to content

Case conversion#4263

Merged
Shubham8287 merged 162 commits intomasterfrom
shub/case-conversion
Feb 20, 2026
Merged

Case conversion#4263
Shubham8287 merged 162 commits intomasterfrom
shub/case-conversion

Conversation

@Shubham8287
Copy link
Contributor

@Shubham8287 Shubham8287 commented Feb 11, 2026

Description of Changes

Update the Default casing policy to snake_case for RawModuleDefV10.

Messy PR contains changes at different places, so that CI can pass:

Here are the main changes as follows:

  • bindings-macro & bindings crate: name macro in Indexes for canonical name and supply it to RawModuleDefV10 via ExplicitNames.

  • bindings-typescript:

  • binding-csharp: a single line change to pass sourceName of index instead of null.

  • codegen:

  • schema crate:

    • validate/v9 - Nothing itself should change or changes in v9 validation logic but the file contains a CoreValidator which is shared with validate/v10. No test have t be updated to validate/v9 which ensures we aren't regressing it.

    • validate/v10: This is the main meat, look at the new tests added in bottom to understand what it does.

    • Rest of the files are either test updates or module bindings.

    Testing:

    1. Extensive unit tests have been added to verify generated ModuleDef is correct.
    2. I have done some e2e testing to verify rust codegen with rust and typescript modules.
    3. I would have like to do more testing for other codegens , I am continue doing .

I have removed sql.py smoketest, as that seems to be already migated in new framework and was headache to update.

Expected complexity level and risk

4, It could have side-effect which aren't easily visible.


@Shubham8287 Shubham8287 marked this pull request as draft February 11, 2026 12:20
@Shubham8287 Shubham8287 force-pushed the shub/case-conversion branch 2 times, most recently from 7ee1b81 to 1ba4286 Compare February 11, 2026 13:13
@Shubham8287 Shubham8287 force-pushed the shub/case-conversion branch 2 times, most recently from 73f986b to 7d0ddae Compare February 11, 2026 17:37
@Shubham8287 Shubham8287 changed the base branch from master to shub/table-name-to-accessor February 11, 2026 17:38
@Shubham8287 Shubham8287 force-pushed the shub/case-conversion branch 2 times, most recently from d616ea9 to cbcd089 Compare February 11, 2026 21:07
@Shubham8287 Shubham8287 force-pushed the shub/table-name-to-accessor branch from f5cbb0e to ee62ea2 Compare February 11, 2026 21:08
@Shubham8287
Copy link
Contributor Author

This PR have a known bug related to due to camel casing table identifier in typescript bindings, I have @coolreader18 to look into that.

Copy link
Collaborator

@joshua-spacetime joshua-spacetime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of this change set has already been reviewed and approved by various individuals including myself in the form of other PRs targeting this branch. Pending the tests succeeding, this should be ready to merge.

gefjon and others added 2 commits February 19, 2026 21:45
The tbl() helper was using toCamelCase(name) at runtime to look up
tables on ctx.db, but the table accessor names (keys in the schema
object) were snake_case. This mismatch caused 'Cannot read properties
of undefined' errors for every insert/delete reducer.

Fix: use camelCase keys directly in the table definitions (matching
TypeScript convention), and access ctx.db[name] without runtime
conversion. Remove the now-unused toCamelCase import.
clockwork-labs-bot and others added 8 commits February 19, 2026 23:26
In db_connection_impl.ts, reducers and procedures were recomputing
accessor names with toCamelCase(name) instead of using the accessorName
already set on the definition. Tables already used tbl.accessorName
directly. Make reducers and procedures consistent.
Re-ran spacetime generate for both modules to pick up codegen changes.
Removes stale files (schedule_proc_type, scheduled_proc_procedure,
scheduled_proc_table_table, player_location_table) that are no longer
generated because those tables are private/scheduled.
Regenerate verified snapshots for server, diag, and explicitnames
fixtures. Main change: index AccessorName is now populated where it
was previously null.
@Shubham8287 Shubham8287 disabled auto-merge February 20, 2026 09:17
@Shubham8287 Shubham8287 added this pull request to the merge queue Feb 20, 2026
Merged via the queue into master with commit e2f8a60 Feb 20, 2026
30 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-break A PR that makes an API breaking change release-2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

Comments